<?php

namespace StudyBuddy;

class SubmittedProfileWWW extends SubmittedProfile {

    protected $oForm;

    public function __construct(\StudyBuddy\Forms\Profile $oForm) {
        $this->oForm = $oForm;
    }

   public function getTmpRole() {
       return $this->oForm->getSubmittedValue('tmp_role');
  }

//
//	public function getFirstName(){
//		return $this->oForm->getSubmittedValue('fn');
//	}
//
//	public function getLastName(){
//		return $this->oForm->getSubmittedValue('ln');
//	}
//
//	public function getMiddleName(){
//		return $this->oForm->getSubmittedValue('mn');
//	}

    public function getFullName() {
        return $this->oForm->getSubmittedValue('fullname');
    }

    public function getSoWA() {
        return $this->oForm->getSubmittedValue('sowa');
    }

    public function getCountry() {
        return $this->oForm->getSubmittedValue('cc');
    }

//
//	public function getState(){
//		return $this->oForm->getSubmittedValue('state');
//	}
//
//	public function getCity(){
//		return $this->oForm->getSubmittedValue('city');
//	}
//
//	public function getZip(){
//		return $this->oForm->getSubmittedValue('zip');
//	}

    public function getDob() {
        return $this->oForm->getSubmittedValue('dob');
    }

    public function getGender() {
        $val = $this->oForm->getSubmittedValue('gender');
        $val = strtoupper($val);

        return (('M' !== $val) && ('F' !== $val)) ? '' : $val;
    }

//
//	public function getUrl(){
//		return $this->oForm->getSubmittedValue('url');
//	}
//
//	public function getDescription(){
//		return $this->oForm->getSubmittedValue('description');
//	}

    public function getUploadedAvatar() {
        if (!$this->oForm->hasUploads()) {
            return null;
        }

        return $this->oForm->getUploadedFile('profile_image');
    }

}
